<!--
 * @Author: xiaolong.luo@flowportal xiaolong.luo8888
 * @Date: 2024-04-30 15:43:20
 * @LastEditors: xiaolong.luo@flowportal xiaolong.luo8888
 * @LastEditTime: 2024-05-16 08:57:55
 * @FilePath: \v2-project\src\views\portal\field\NewsGrid.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!--
 * @Author: xiaolong.luo@flowportal xiaolong.luo8888
 * @Date: 2024-04-30 15:43:20
 * @LastEditors: xiaolong.luo@flowportal xiaolong.luo8888
 * @LastEditTime: 2024-04-30 20:51:23
 * @FilePath: \v2-project\src\views\portal\field\NewsGrid.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <div id="abc111"></div>
    <NewsDetails v-for="item in list" :key="item.ID" :item="item"></NewsDetails>
  </div>
</template>

<script>
import { getNews } from '@/api/portal/news'

export default {
  name: 'NewsGrid',
  data() {
    return {
      list: [],
    }
  },
  created() {
    //发送请求数据
    const queryString = {
      portalId: 1,
      newsType: '公司新闻',
      page: 1,
      start: 0,
      limit: 20,
    }
    getNews(queryString)
      .then((res) => {
        this.list = res.children
      })
      .catch(() => {})
  },
}
</script>
